<!DOCTYPE html>
<html>
   <head>
      <meta charset="utf-8" />
      <title>How to use the data parameter of the on() method - jQuery in Action, 3rd edition</title>
      <link rel="stylesheet" href="../css/main.css"/>
   </head>
   <body>
      <button id="my-button">Click me!</button>

      <p>The output is printed on the console</p>

      <script src="../js/jquery-1.11.3.min.js"></script>
      <script>
         $('#my-button').on('click', {
            name: 'John Resig'
         }, function (event) {
            console.log('The name is: ' + event.data.name);
         });
      </script>
   </body>
</html>